package com.nulldev.util.web.nTubeExtensions.services.radio;

import com.nulldev.util.VariableAPI.ArrayUtils;
import com.nulldev.util.data.legacy.XML.lXML;
import com.nulldev.util.data.legacy.XML.lXML.Doc;
import com.nulldev.util.web.HttpClient.HttpClient;

public class RadioTime {

	private static final String CORE_URL = "http://opml.radiotime.com/";
	private static final String BROWSE_URL = "http://opml.radiotime.com/Browse.ashx?";

	private static final String[] SUPPORTED_CATEGORIES = new String[]
		{ "local" };

	public static void browse(final String category) throws Exception {
		if (!ArrayUtils.contains(SUPPORTED_CATEGORIES, category))
			throw new UnsupportedOperationException("Unknown category: " + category);
		final String response = HttpClient.getString().url(BROWSE_URL + "c=" + category).create().dataThenClose();
		final Doc doc = lXML.doc(response);

	}
}
